package com.smarthome.common.tools;

import org.apache.commons.lang.StringUtils;

public class BossCachedKeysUtil {

    private static final String NAME_SPACE = "smarthome:boss:";
    public static final String MODULE_USER_PREFIX = "currentUser:";
    public static final String MODULE_USER_RESIDENCE_PREFIX = "currentResidenceId:";
    public static final String MODULE_USER_RESOURCE = "userResource:";
    public static final String MODULE_HK_VIDEO_TOKEN = "haikangVideoToken:";
    public static final String MODULE_HK_TALKDOOR_DEVICE = "haikangTalkDoorDevice:";
    
    public static final String AREA_PROVINCE ="areaProvince:";
    public static final String AREA_CITY = "areaCity:";
    public static final String AREA_DISTRICTS= "areaDistricts:";

    public static String getKey(String module, String key) {
        if (StringUtils.isBlank(module) || StringUtils.isBlank(key)) {
            throw new IllegalArgumentException("[Cache]the module and key cann't be blank.");
        }
        return String.format("%s_%s_%s", NAME_SPACE, module, key);
    }

}